<template>
  <div class="my-guide">
    <input name="guideId" type="hidden" :value="guide.id" />
    <div class="wrapper-icon">
      <img v-if="guide.iconUrl == null || guide.iconUrl == ''" src="static/img/server/usericon.png"  />
      <!-- <img v-else :src="'static/img/client/'+guide.iconUrl" /> -->
      <img v-else :src="$platIMG + guide.iconUrl" />
    </div>
    <div class="wrapper-text">
      <div class="text-line">
        <span>{{guide.nickName}}</span>
        <span>{{genderText}}</span>
        <span>34</span>
      </div>
      <div class="text-line">
        <span>{{guide.level}}分</span>
        <span>|</span>
        <span class="iconfont arrow-icon">&#xe602;</span>
        <span>302</span>
      </div>
    </div>
    <div class="wrapper-img">
      <img v-if="guide.imgUrl == null || guide.imgUrl == ''" src="static/img/server/userbanner.jpg" height="175px"/>
      <img v-else :src="$platIMG + guide.imgUrl" height="175px" />
      <div class="wrapper-location">
      <span class="iconfont icon-location">&#xe609;</span>
      {{guide.cityName}}
    </div>
    </div>
    
  </div>
</template>

<script>
import { getDictionaryKey } from "@/libs/util.js";
export default {
  name: "my-guide",
  data() {
    return {
      genderText:"",
    };
  },
  props: ["guide"],
  mounted() {
    this.genderText = getDictionaryKey('key1000', this.guide.gender);
  }
};
</script>

<style lang="stylus" scoped>
.my-guide {
  position relative;
  margin 0.2rem;
  padding 0.2rem 0.3rem;
  border-radius: 3px;
  box-shadow: 0 0 3px 3px rgba(0, 0, 0, 0.2);
  background-color #fff;

  .wrapper-icon {
    position: absolute;
    border-radius: 0.75rem;
    border:5px solid #fff;
    width: 65px;
    height: 65px;
    left: 0.7rem;
    top: 0.1rem;
    background-color: #fff;
    overflow: hidden;
    z-index: 1;

    img {
      width 100%;
      height 100%;
    }
  }

  .wrapper-text {
    // height: 0.9rem;
    padding: 0.1rem 0 0.1rem 2.1rem;
    // padding-top: 0.6rem;

    .text-line {
      height: 0.44rem;
    }
  }

  .wrapper-img {
    overflow: hidden;
    border-radius: 0.2rem;
    position: relative;
    width: 100%;
    padding-bottom: 55%;
    height: 0;
    background-color: #eee;

    img {
      position:absolute
      left 0
      top 0
      width: 100%;
      height 100%
    }

    .wrapper-location {
      position: absolute;
      right: 0.2rem;
      bottom: 0.15rem;
      color #fff;
    }
  }
}
</style>